home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 726-750 / 745 / wizkey / wizkey.doc < prev    next >
Text File  |  1995-03-18  |  19KB  |  451 lines

  1. ***************************************************************************
  2.  
  3.                                   WizKey
  4.  
  5.                    Copyright 1992 by Jörg von Frantzius
  6.  
  7. ***************************************************************************
  8.  
  9.         WizKey is SHAREWARE, see end of this document for details.
  10.  
  11. ***************************************************************************
  12.  
  13. AGREEMENT: By using WizKey you agree that the author will not be
  14. responsible for any damages resulting from malfunction or wrong
  15. documentation of WizKey.
  16.  
  17.  
  18. What is WizKey?
  19. ---------------
  20.  
  21. WizKey is just another commodity, intended to speed up working with windows
  22. and screens. This is accomplished by letting the user manipulate that stuff
  23. via the keyboard instead of having to:
  24. 1. grab your mouse (i.e. get your fingers off the keyboard...)
  25. 2. look for gadgets
  26. 3. aim at these gadgets and click
  27. 4. search for windows in huge window-piles etc.
  28.  
  29.  Anything you can do with system gadgets becomes accessible via keyboard
  30. using WizKey, plus some additional comfort (it's a commodity!).
  31.  A windowlist pops up on hotkey invocation, showing a list of all windows
  32. available on the active screen and letting you pick a window with the mouse
  33. or the keyboard (available on public screens only).
  34.  The hotkey definitions are free configurable (using any text editor),
  35. allowing you to extend WizKey's functionality to your special needs in
  36. combination with its complete AREXX port. Any Arexx-script may be mapped
  37. to any key combination using normal commodities conventions (those
  38. provided by commodities.library).
  39.  You may for example map a script to the hotkey "lcommand e", which will pop
  40. up your editor's window and screen and activate it, no matter on which
  41. screen you have been working on.
  42.  
  43.  
  44. Installation
  45. ------------
  46.  
  47. As it is a commodity, WizKey needs at least OS 2.0.
  48. Workbench: place WizKey into your Wbstartup drawer to start WizKey with
  49. every boot-up, or double-click on it everytime you want to use it.
  50. If you have installed WizKey in your WBstartup-drawer, I suggest you
  51. install its Preference file in your environment, so that WizKey will
  52. find it on boot-up:
  53. Double-click on "InstallPrefs" to copy WizKey's preference file to
  54. "env:WizKey/WizKey.prefs"
  55. and
  56. "envarc:WizKey/WizKey.prefs"
  57. The preference file contains some hotkey definitions that can't be used
  58. if WizKey can't find its preference file.
  59.  
  60. Shell: put something like "run >NIL: WizKey" into your user-startup script,
  61. if you really don't like the wbstartup drawer.
  62. See "The preference file" for some locations where WizKey can find its
  63. preference file.
  64. I'm not sure how much stack exactly WizKey needs, but 4096 is definitely
  65. not enough. I suggest about 10000 bytes, if you encounter problems (Wizkey
  66. should report that) raise the stack.
  67.  
  68.  
  69. The preference file + Arexx Port
  70. --------------------------------
  71.  
  72. WizKey's Arexx host port is named "WizKey" (case sensitive).
  73. WizKey tries to locate a preference file following the rules given in the
  74. user interface style guide, or at least my interpretation of these. Using
  75. tooltypes or commandline parameters you may specify a certain preference
  76. file to be used by WizKey, or a directory containing the file
  77. "WizKey.prefs".
  78.  
  79. Tooltype example:    "SETTINGS=Work:stuff/WizKey.prefs"
  80. commandline example: "run WizKey settings=Work:stuff/WizKey.prefs"
  81.  
  82. If no preference file is specified, WizKey will look for it in its program
  83. directory, if it can't be found there it will look for
  84. "ENV:WizKey/WizKey.prefs" in the last place. If no preference file at all
  85. could be found, WizKey uses its built-in defaults.
  86.  
  87. The preference file is a plain ascii file editable with any ascii-editor.
  88. It consists of hotkey-definitions using the template:
  89.  
  90. commandName = hokey definition
  91. e.g.: WindowList = lcommand help
  92.  
  93. The example given will open the windowlist by pressing the keys left amiga +
  94. help key (which is the built-in default for this command, btw). Hotkey
  95. definitions using plain command names without arguments like the example
  96. above will override WizKey's built-in hotkey defaults. Anything else WizKey
  97. does not "know" will be considered being some kind of arexx script, i.e.
  98. string file or physical file. The hotkey defaults exist for simple commands
  99. only that do not require arguments.
  100. If a line does not contain a "=" or no valid Input Description String, it
  101. will be completely ignored.
  102.  
  103. Small Arexx-Scripts may be put into the preference file using so-called
  104. string files, e.g.:
  105.  
  106. "ActivateWindow 'Shell'; WinToFront; ScrToFront" = lcommand s
  107.  
  108. Pressing left amiga+"s", this example  will activate the first window
  109. containing the string "Shell", pop it to front and pop its screen to front.
  110. Note that in string files you do not need to say "Address 'WizKey'" to have
  111. access to WizKey's arexx-commands, since these string files will be
  112. executed from within Wizkey. String files are always surrounded by
  113. quotemarks.
  114. As well a filename may be specified, which WizKey will try to execute as an
  115. Arexx-script., e.g:
  116.  
  117. rexx:doSomeThing.wiz = lalt s
  118.  
  119. WizKey will try to execute the file "rexx:doSomeThing.wiz" as an
  120. Arexx-Script. Filenames do not need to be surrounded by quotemarks.
  121.  
  122. WizKey's built-in hotkey defaults use some combinations of keys that are
  123. not accessible through input description strings, e.g. WinToFront's hotkey
  124. would be something like "lcommand lshift", which is not a valid input
  125. description string. I'm sorry about that, but commodities.library does not
  126. support that (yet?); if somebody needs to define hotkeys like that himself,
  127. I might add something non-standard to accomplish that.
  128.  
  129.  
  130. WizKey's commands in detail
  131. ---------------------------
  132.  
  133. Following is a list of WizKey's functions, including their arexx command
  134. names and default hotkeys.
  135. As a lot of Intuition procedures run asynchronously (sp?) from WizKey, every
  136. arexx-command of WizKey is followed automatically by a certain delay that
  137. makes sure the Intuition procedure really has completed. This is important
  138. since some combinations of Intuition procedures (which are invoked by
  139. WizKey's Arexx-commands) depend on the completion of the previous command,
  140. e.g. "CenterWindow X; ExpandBottom": the window would be expanded to the
  141. bottom before it is centered in the middle of the screen, because WizKey
  142. examines the Window's data before Intuition changes them.
  143. However, this delay often slows down arexx-scripts unnecessarily, so you
  144. can switch it off by providing the "ND=NoDelay/S" argument with your
  145. invocation, e.g.: "WinToFront nd; ScrToFront" - here the delay would not
  146. be necessary so it is switched off.
  147.  
  148.  
  149. NAME:      Quit,             lcommand x
  150. Arguments: Force/S
  151.   WizKey removes itself from memory. You'll never use this one, anyway ;-)
  152.   If called with "Force/S" WizKey won't ask silly questions before removing
  153.   itself.
  154.  
  155.  
  156. Windowlist stuff:
  157.  
  158. NAME:      WindowList,       lcommand help
  159. Arguments: ND=NoDelay/S
  160.   If the active screen is a public screen, a window is opened containing the
  161.   titles of every window on the screen. Click on a title to pop a window to
  162.   the front and activate it; the active window is marked with a "*". 
  163.   To activate the windowlist, which is not activated when opened, press the 
  164.   hotkey again, then cursor up and down to scroll through the windowlist.
  165.   The default preference file conains some little arexx-scripts enabling
  166.   you to pick windows with the keys lcommand + F1-F10 and "1"-"0", according 
  167.   to the numbers displayed in the windowlist.
  168.  
  169. NAME:      ToggleTitles,     lcommand t
  170. Arguments: none
  171.   By default the windowlist displays the windows' titles, with this command
  172.   the display can be switched to the windows's screentitles and back. Very
  173.   useful for my texteditor :-)
  174.  
  175. NAME:      CloseList,        lcommand delete
  176. Arguments: ND=NoDelay/S
  177.   Closes the windowlist.
  178.  
  179.  
  180. Activation stuff + shuffling::
  181.  
  182. NAME:      NextWin,          lcommand tab
  183. Arguments: ND=NoDelay/S
  184.   Activates the next window in the windowlist, allowing you to activate any
  185.   window on screen.
  186.  
  187. NAME:      PrecedingWin,     lcommand `  (the key above tab)
  188. Arguments: ND=NoDelay/S
  189.   Activates the window preceding the active window in the windowlist.
  190.  
  191. NAME:      TopWinToBottom,   lcommand up (i.e. cursor up)
  192. Arguments: ND=NoDelay/S
  193.   The window on top of the active screen's window pile is dropped to the
  194.   bottom, the window now on top is activated.
  195.   Handy to shuffle through the window pile.
  196.  
  197. NAME:      BottomWinToFront, lcommand down (i.e. cursor down)
  198. Arguments: ND=NoDelay/S
  199.   The bottom window of the window pile is brought to the top and is
  200.   activated.
  201.  
  202. NAME:      WinToFront,       lcommand lshift
  203. Arguments: ND=NoDelay/S
  204.   The active window is brought to the front.
  205.  
  206. NAME:      WinToBack,        lcommand rshift
  207. Arguments: ND=NoDelay/S
  208.   The active window is dropped to the bottom.
  209.  
  210. NAME:      CloseWindow,      lcommand q
  211. Arguments: ND=NoDelay/S
  212.   If the active window contains a close gadget, WizKey tries to close the
  213.   window.
  214.  
  215.  
  216. Window sizin'n'movin':
  217. Any change of size and position performed through WizKey may be taken back
  218. one time for each window, see "RestoreWindow".
  219.  
  220.  
  221. NAME:      ToggleClip,       lcommand c
  222. Arguments: "On/S,Off/S"
  223.   Determines whether certain WizKey-commands take care of the active screen's
  224.   display clip, i.e. size and position of the visible portion of the screen.
  225.   "On/S,Off/S" set or unset an internal boolean flag, without any arguments
  226.   this flag is toggled.
  227.   In Arexx-scripts this global flag may be overridden individually by each
  228.   command that accepts the arguments "DClip/S,NoDClip/S".
  229.  
  230. NAME:      ReduceWindow,     lcommand r
  231. Arguments: ND=NoDelay/S
  232.   The active window is sized to its minimum.
  233.  
  234. NAME:      FullSize,         lcommand f
  235. Arguments: ND=NoDelay/S
  236.   The active window is sized to its maximum. If the display clip flag is set,
  237.   FullSize will try to move the active window into the display clip and size
  238.   it appropriately.
  239.  
  240. NAME:      Zip,              lcommand z
  241. Arguments: ND=NoDelay/S
  242.   Just like clicking on the active window's zip gadget.
  243.  
  244. NAME:      RestoreWindow,    lcommand backspace
  245. Arguments: ND=NoDelay/S
  246.   The window's last change of position and/or size done with WizKey is
  247.   taken back. Even "RestoreWindow" itself can be taken back.
  248.  
  249.  
  250. Screen shuffling:
  251.  
  252. NAME:      ScreenToBack,     rcommand up
  253. Arguments: ND=NoDelay/S
  254.   The active screen is dropped behind any other screen, the screen's active
  255.   window is remembered. If WizKey can remember an active window on the next
  256.   screen, the window is activated, else the window covering the screen's
  257.   centre is activated or the screen's first window is activated.
  258.  
  259. NAME:      BackScreenToFront,rcommand down
  260. Arguments: ND=NoDelay/S
  261.   The bottom screen is popped to the front, activation of its window is the
  262.   same as in "ScreenToBack".
  263.  
  264.  
  265. Arexx only commands:
  266. These commands are accessible via AREXX only, there exist no internal
  267. default hotkeys for them.
  268. Further examples for these commands can be found in the preference file.
  269.  
  270. NAME:      ActivateWindow
  271. Arguments: WinTitle/A,ND=NoDelay/S
  272.   WizKey searches through every window on any screen for a window title
  273.   that contains (!) the title given as an argument, and activates it if it
  274.   finds one. "ActivateWindow 'rkben'" for example will activate the window
  275.   'Workbench', if there is one. The search is case sensitive.
  276.  
  277. NAME:      GetWinTitle
  278. Arguments: none
  279.   Requiring "options result" before invocation, this function returns the 
  280.   title of the active window. Example (to type in the shell):
  281.   rx "address 'WizKey'; options results; GetWinTitle; say result"
  282.   this will print the name of the shell window in the shell.
  283.  
  284. NAME:      PickWindow
  285. Arguments: Number/A/N,ND=NoDelay/S
  286.   The window at the position <number> in the windowlist will be activated
  287.   and popped to the front. See preference file for examples.
  288.     
  289. NAME:      ScrToFront
  290. Arguments: ScrTitle,ND=NoDelay/S
  291.   If provided with a screentitle argument, this command will pop the first
  292.   screen containing the argument string  in its title to the front. Without
  293.   any argument, this will bring the active window's screen to front.
  294.  
  295. NAME:      RelSizeWindow
  296. Arguments: Numerator/A/N,Denominator/A/N,X/S,Y/S,ND=NoDelay/S
  297.   The active window's size is changed to a fraction relative to its screen
  298.   size. X and Y determine whether this affects only the window's width,
  299.   only the window's height, or both. Example: "RelSizeWindow 5 7 X Y" will
  300.   size the active window both in width and height to 5/7 of its screen's
  301.   size. "RelSizeWindow 1 2 Y" will size the active window only in height to
  302.   1/2 (one half) of its screen's height.
  303.  
  304. NAME:      RelMoveWindow
  305. Arguments: WhichWin/A/N,NumberWins/A/N,X/S,Y/S,ND=NoDelay/S
  306.   Hmpf. Not too easy to explain. If the active screen's specified axis
  307.   (specified by "X/S" and "Y/S") was divided into "NumberWins/N" Windows,
  308.   the parameter "WhichWin" specifies the position this Command moves the
  309.   active Window to. Nobody will understand that, including myself in half
  310.   an hour. The purpose of this command is to offer the opportunity of
  311.   writing arexx-scripts that tile windows in a sophisticated manner (in
  312.   combination with "RelSizeWindow"), the thing is just that I have yet to
  313.   write these arexx-scripts. Right now I'm starting to doubt that this is
  314.   the right way, though ...
  315.   For now you can move windows with this command to some places other than
  316.   the screen's border or center.
  317.   Example: "RelSizeWindow 1 4 X; RelMoveWindow 3 4 X" - the active window's
  318.   with is sized to 1/4 of its screen's width, and it's moved to the position
  319.   of the third window of four windows (with width=1/4 of the screens' width)
  320.   that you have to imagine standing next to each other in a row on the
  321.   x-axis of the screen. Can't find an explanation now that sounds less
  322.   ridiculous ...
  323.  
  324. NAME:      ExpandWindow
  325. Arguments: "Left/S,Right/S,Top/S,Bottom/S,DClip/S,NoDClip/S,ND=NoDelay"
  326.   According to the arguments passed to it, ExpandWindow expands the active
  327.   window's borders to its screen's borders or the momentary display clip's
  328.   borders. The latter can be switched on and off by the arexx-command
  329.   "ToggleClip" or by providing the appropriate argument to "ExpandWindow",
  330.   see argument template.
  331.   Every combination of directions makes sense, e.g.
  332.   "ExpandWindow Top Bottom Right".
  333.  
  334. NAME:      SnapWindow
  335. Arguments: "Left/S,Right/S,Top/S,Bottom/S,DClip/S,NoDClip/S,ND=NoDelay"
  336.   The active window is moved to its screens or display clip's borders.
  337.   Combinations of opposite movement directions (like "Top Bottom") do
  338.   not make sense, I'm not quite sure now where exactly the window would
  339.   be moved...
  340.   See "ExpandWindow" and "ToggleClip" for details on the display clip.
  341.  
  342. NAME:      CenterWindow
  343. Arguments: "X/S,Y/S,ND=NoDelay"
  344.   The active window is moved to its screen's or the momentary display
  345.   clip's center horizontally or vertically or both, depending on the
  346.   arguments provided.
  347.   See "ExpandWindow" and "ToggleClip" for details on the display clip.
  348.  
  349.  
  350. Future Enhancements
  351. -------------------
  352.  
  353. I have some ideas already for some new commands and Arexx-scripts that help
  354. tiling windows and stuff like that, this sure will come.
  355. I have just learned that the delay I am using to assure the completion of
  356. Intuition procedures ist not sufficient in every situation; I don't like
  357. this one anyway, so I'm going to find a different solution.
  358. If you have any idea of improvements or corrections then please tell me
  359. about it, maybe I will implement it.
  360. There might especially be some useful Arexx-commands I did not think of.
  361. Of course I'd appreciate any bug report very much, too, the more detailed 
  362. the better.
  363.  
  364.  
  365. SHAREWARE
  366. ---------
  367.  
  368. If you use WizKey frequently then feel free to send me a donation of 20$ or
  369. 20 DM. If you can't afford that much money or if you think that WizKey is
  370. worth less, feel free to send less money, that's ok.
  371. If you think that WizKey is worth much more than 20$, don't hesitate to send 
  372. much more than 20$. 
  373. If you do not like WizKey or do not have any computer at all, and you don't 
  374. know how to get rid off your money, this might be a reason to send some
  375. money to me, too, you are welcome.
  376.  
  377. My address is:
  378.                      Jörg von Frantzius
  379.                      Neue Königstr 61
  380.                      W-5040 Brühl
  381.                      Germany
  382.  
  383. Email:               NOVALIS@DARKNESS.ZER
  384. Internet:            novalis@darkness.gun.de
  385.  
  386. My bank account is:  BLZ 37010050, number 04199 53-507
  387.                      Postgiroamt Köln
  388.  
  389.  
  390. UPDATES
  391. -------
  392.  
  393. Registered users can obtain updates for free, e.g. the cost of postage,
  394. envelope and diskette. I suggest about $3 or 3,- DM in Germany, I hope
  395. that's enough... Since I am working on WizKey almost everytime I switch
  396. on my computer, chances are good that there's a new version available
  397. every now and then.
  398.  
  399.  
  400. HISTORY
  401. -------
  402.  
  403. WizKey 1.14 first public release
  404.  
  405. WizKey 1.15 10-Jul-1992
  406. Changes, or better bugfixes:
  407. - WizKey now runs on those few Amigas with an 68000 in it ;-)
  408. - a potentially nasty bug that showed up only when at least two
  409.   users are playing with WizKey and the mouse simultaneously
  410.   is fixed now
  411. - Bug in AREXX-Command ScrToFront fixed that would bring up
  412.   the Workbench no matter what Screenname was passed to it
  413. - now CX_PRIORITY may be passed either as a ToolType or CLI-
  414.   Parameter to determine the priority of WizKey in relation
  415.   to other running Commodities. BTW, hey Commodore, why
  416.   doesn't Exchange show nor change these priorities?
  417. - WizKey now removes properly when started twice
  418.  
  419. WizKey 1.16 2-Aug-1992
  420. - WizKey should now REALLY run on 68000...
  421. - Arexx-argument parsing is now done by Dos' ReadArgs(); argument templates
  422.   now look standard-like
  423. - "ND=NoDelay/S" argument introduced for every Arexx-command that makes sense
  424.   with this argument, speeding up arexx-scripts a lot
  425. - Expand + FullSize take care of the display clip; ToggleClip switches the
  426.   flag telling if they should or not
  427. - some bugs fixed, I really can't remember them all now ;-)
  428.  
  429. WizKey 1.17 7-Aug-1992
  430. - WizKey now DOES run on 68000... ahem (at least on my A1000)
  431. - MoveXXXXX, MoveXYCenter and ExpandXXXXX become single Arexx commands each,
  432.   requiring some arguments to be passed to them; all of them take care of the
  433.   display clip now
  434. - DClip/S and NoDClip/S arguments introduced to arexx-commands that take care
  435.   of the display clip
  436. - ToggleClip defaults now to Yes, and accepts arguments "On/S,Off/S"
  437. - WindowList now always opens within the display clip
  438.  
  439. WizKey 1.18 2-Sep-1992
  440. - WizKey now seems to run always on my A1000, really... yeah
  441. - "Quit" accepts argument "Force/S" (I once needed it myself)
  442. - PropGadget looks nicer now (very important thing)
  443. - opening the WindowList could in some situations freeze the machine, fixed now
  444. - Added command "RelMoveWindow"
  445. - Some renaming again: "MoveWindow" is called "SnapWindow" now,
  446.                        "ShrinkWindow" is called "RelSizeWindow"
  447.   The new prefsfile reflects the new names, of course. I suggest those 4 of 5
  448.   people who are using WizKey already replace their old prefsfiles with the new
  449.   one.
  450.  
  451.